<template>
  <div class="flex">
      <div v-for="(item,index) in Object.keys(MenuChildrens)" :key="index" class="cooking">
          <!-- 背景色块 {{item}}键对应的数组里的内容标题如：水产=>虾：[]-->
         <div class="homecooking">{{item}}</div>    
        <ul>
            <!-- 菜单数据 -->
            <li v-for="(item,index) in MenuChildrens[item]" :key="index">{{item}}</li>
        </ul>
      </div>
  </div>
</template>

<script>
export default {
    name:'FoodsRight',
    props:['MenuChildrens']
}
</script>

<style scoped>
.flex{
    flex: 50%;
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: #fff;
}
.cooking{
    width: 100%;
    text-align: center;
    height: 90%;
    margin-left: 32px;
    
}
/* 背景色块 */
.homecooking{
    width: 90%;
    height: 50px;
    background-color: rgb(253, 224, 231);
    border-radius: 10px;
    margin-top: 20px;
}
ul{
    flex: 20%;
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
}
ul li{
    display: flex;
    width: 26%;
    height: 30px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 2px 0px 0 rgba(0, 0, 0, 0.19);
    justify-content: center;
    border-radius: 7px;
    margin-top: 15px;
    margin-right: 20px;
}

</style>